﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace TextEditor4
{
    public partial class Help : Form
    {
       
        public Help()
        {
            InitializeComponent();
        }

        private void Help_Load(object sender, EventArgs e)
        {

        }



        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            if (e.Node.Name == "Help")
            {
                StreamReader read = new StreamReader("Help.txt", Encoding.UTF8);
                string FLang = read.ReadToEnd();
                richTextBox1.Text = FLang;
                read.Dispose();
            }
            else
            {
                if (e.Node.Name == "TE4 Text Editor4")
                {
                    StreamReader read1 = new StreamReader("TE4 Text Editor4.txt", Encoding.UTF8);
                    string FLang = read1.ReadToEnd();
                    richTextBox1.Text = FLang;
                    read1.Dispose();
                }

                else
                {
                    if (e.Node.Name == "Using the Help Viewer")
                    {
                        StreamReader read1 = new StreamReader("Using the Help Viewer.txt", Encoding.UTF8);
                        string FLang = read1.ReadToEnd();
                        richTextBox1.Text = FLang;
                        read1.Dispose();
                    }
                    else
                    {
                        if (e.Node.Name == "Help viewer overview")
                        {
                            StreamReader read1 = new StreamReader("Help viewer overview.txt", Encoding.UTF8);
                            string FLang = read1.ReadToEnd();
                            richTextBox1.Text = FLang;
                            read1.Dispose();
                        }
                        else
                        {
                            if (e.Node.Name == "Getting Help")
                            {
                                StreamReader read1 = new StreamReader("Getting Help.txt", Encoding.UTF8);
                                string FLang = read1.ReadToEnd();
                                richTextBox1.Text = FLang;
                                read1.Dispose();
                            }

                            else
                            {
                                if (e.Node.Name == "TE4 overview")
                                {
                                    StreamReader read1 = new StreamReader("TE4 overview.txt", Encoding.UTF8);
                                    string FLang = read1.ReadToEnd();
                                    richTextBox1.Text = FLang;
                                    read1.Dispose();
                                }
                                else
                                {
                                    if (e.Node.Name == "Interface")
                                    {
                                        StreamReader read1 = new StreamReader("Interface.txt", Encoding.UTF8);
                                        string FLang = read1.ReadToEnd();
                                        richTextBox1.Text = FLang;
                                        read1.Dispose();
                                    }
                                }

                            }

                        }
                    }
                    
                }
            }

        }
             

                 


        private void richTextBox1_TextChanged(object sender, EventArgs e)
        {

        }

       
    }
}
